import request from '@/utils/request.js'

// 问答记录列表
export function getFileListAPI(params) {
  return request({
    url: '/api/data/noPagelist',
    method: 'GET',
    params,
  })
}

export function fileUploadAPI(id, data) {
  return request({
    url: '/api/data/' + id,
    method: 'POST',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
      repeatSubmit: false,
    },
    timeout: 300000,
  })
}

export function delFileAPI(params) {
  return request({
    url: '/api/data',
    method: 'DELETE',
    params,
  })
}
export function getFileDetails(id) {
  return request({
    url: '/api/data/file/' + id,
    method: 'GET',
  })
}
//规则过滤
export function ruleFilterAPI(data) {
  return request({
    url: '/api/data/file/ruleFilter',
    method: 'POST',
    data,
    responseType: 'blob',
  })
}
//整体过滤
export function totalFilterAPI(data) {
  return request({
    url: '/api/data/file/totalFilter',
    method: 'POST',
    data,
    responseType: 'blob',
  })
}
//生成报告
export function generateReportAPI(data) {
  return request({
    url: '/api/data/file/generateReport',
    method: 'POST',
    data,
    responseType: 'blob',
  })
}
